<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="./js/vue.js"></script>
    <title>Title</title>
</head>
<body>
<div id="app">
    <button  @click="randomimg">点我看美女</button>
    <br>
    <img :src="img" alt="" height="500px">


</div>

</body>
<script>
    var vm =new Vue({
        el:"#app",
        data:{
            jk:true,
            img:["./img/women.jpg"],
            random_img:["./img/2.jpg","./img/3.jpg","./img/4.jpg"]
        },
        methods:{
                // handleShow(){
                //     this.jk =!this.jk
                // }
            randomimg(){
                this.img = this.random_img[Math.floor(Math.random()*3)];
            }
        }

    })
</script>
</html>